<template>
	<view>
		<u-navbar :is-back="true" :title="title" :border-bottom="false" ></u-navbar>
		<view class="content">
			<u-parse :html="data"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				type:'',
				data:'',
				share:uni.getStorageSync('share')
			}
		},
		onLoad(options) {
			this.type = options.type
			if (options.type == 1) {
				this.title = '用户协议'
			} else{
				this.title = '隐私协议'
			}
			this.getHtml()
		},
		methods: {
			async getHtml(){
				const data = {
					type:this.type
				}
				const res = await this.$u.api.getHtml(data)
				this.data = res.data
			}
		}
	}
</script>

<style lang="scss" scoped>
    .content{
		padding: 24rpx 24rpx 50rpx 24rpx;
		font-size: 28rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: 500;
		color: #333333;
		line-height: 44rpx;
	}
</style>
